<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>我爱大重庆</title>
    <meta name="keywords" content="重庆新闻,我爱大重庆,重庆,热点新闻,微信资讯" />
    <meta name="description" content="我爱大重庆资讯平台是我爱大重庆公众平台的附属产品，旨在为我爱大重庆的用户提供一个便捷的实时资讯浏览平台" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.min.css">
    <style>
        body{
            background:#dedede;
        }
        a:link,a:visited,a:hover,a:active{
            color:#333;
        }
        img{
            width:80px;
            height:80px;
            margin-top:10px;
            margin-bottom: 10px;
        }
        blockquote {
            padding: 0px 5px;
            margin: 0 0 0px;
            font-size: 14px;
            border-left: 5px solid #eee;
            max-height: 60px;
            overflow: hidden;
        }
        .list-row{
            margin-top:12px;
            margin-bottom: 12px;
            margin-right:auto;
            margin-left: auto;
            background:#FFF;
            border-radius: 5px;
            height:auto;
            box-shadow: 2px 2px 5px #777;
        }
        .col-lg-12{
            padding-right: 9px;
            padding-left: 9px;
        }
        .col-xs-3{
            padding-right: 5px;
            padding-left: 5px;
        }
        .col-xs-9{
            padding-left:20px;
            padding-right: 5px;
            height:auto;
        }
        .header{
            position: fixed;
            z-index: 9;
            top: 0;
            width:100%;
            height:40px;
            box-shadow: 0px 0px 20px #777;
            background:#FFF;
        }
        .header>button{
            width:100%;
            height: 40px;
            border:0;
            margin:0px auto;
        }
        .margin-bottom{
            height:30px;
        }
        #cover{
            display:none;
            position:absolute;
            left:0;
            top:0;
            z-index:29;
            background-color:#000000;
            opacity:0.7;
        }
        #guide{
            display:none;
            position:absolute;
            right:18px;
            top:5px;
            z-index:29;
        }
        #guide img{
            width: 100%;
            z-index:91;
        }
        h4 {
            font-size: 18px;
            overflow: hidden;
            height: 40px;
            line-height: 1.2;
            margin-top: 15px;
            /*font-size: 18px;*/
            /*overflow: hidden;*/
            /*height:38px;*/
            /*line-height:1.2;*/
            /*margin-top:17px;*/
        }
        .bottom{
            bottom: 0;
            margin-bottom: 0px;
            position: absolute;
            right: 7px;
            font-size: 12px;
        }
        .p-label{
            margin: 10px 0 10px;
        }
        .p-label span{
            text-align:center !important;
            padding-top:4px !important;
        }

    </style>
</head>

<body>


<div id="cover"></div>
<div id="guide"><img src="http://public.weirongm.com/DaChongQing//images/share.png"></div>

<div class="header">
    <button type="button" class="btn btn-default"  style="width:100%;text-align: center">
        <!--<span class="glyphicon glyphicon-eye-open"></span> 浏览量:<?php echo ($count['see']); ?> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-->
        <span class="glyphicon glyphicon-time"></span> 最后更新:<?php echo (timeFormat($count['createtime'])); ?>
    </button>
    <!--<button type="button" class="btn btn-danger" onClick="_system._guide(true)" style="border:0px;border-radius:0;float:right;text-align: center;width:20%;">分享</button>-->
</div>


<div class="margin-bottom"></div>
<div class="container-fluid">
    <div class="row">
        <div class="col-lg-12">

            <div class="margin-bottom" style="height: 11px !important;"></div>
            <?php if(is_array($list)): foreach($list as $key=>$list): ?><!-------列表------->
                <a href="<?php echo U('News/content','id='.$list['id']);?>">
                <div class="row list-row" style="border-left:4px solid <?php echo RandTopBorder();?>">
                    <div class="col-xs-3">
                        <img src="<?php echo ($list['thumb']); ?>" alt="{<?php echo ($list['title']); ?>}" title="<?php echo ($list['title']); ?>" class="img-rounded">
                    </div>
                    <div class="col-xs-9">
                        <h4><?php echo ($list['title']); ?></h4>
                        <p class="p-label">
                            <?php
 foreach(label_arr($list['label']) as $key=>$val){ echo "<span  class='label label-default ".RandForLabel()."' contenteditable='false'>".$val."</span> "; } ?>

                        </p>
                       <!-- <blockquote>
                            <p style="font-size: 12px"><?php echo ($list['details']); ?></p>
                        </blockquote>-->

                    </div>
                    <div class="col-xs-12" style="margin-top:10px">
                        <div class="bottom">
                            <span class="read">
                                <span class="glyphicon glyphicon-eye-open"></span> <?php echo (dig($list['see'])); ?>
                            </span>&nbsp;&nbsp;
                            <span class="time">
                                <span class="glyphicon glyphicon-time"></span> <?php echo timeFormat($list['createtime']);?>
                            </span>
                        </div>
                    </div>
                </div>
                </a>
                <!-------列表-------><?php endforeach; endif; ?>
            <div class="before"></div>
        </div>
    </div>
</div>
<span class="limit" style="display: none">20</span>


<img src="http://public.weirongm.com/DaChongQing//images/news-loading.gif" class="loading" style="position: fixed;top:50%;left:50%;margin-left:-40px;margin-top:-40px;display: none ">
<script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script>
    //获取滚动条当前的位置
    function getScrollTop() {
        var scrollTop = 0;
        if (document.documentElement && document.documentElement.scrollTop) {
            scrollTop = document.documentElement.scrollTop;
        }
        else if (document.body) {
            scrollTop = document.body.scrollTop;
        }
        return scrollTop;
    }

    //获取当前可是范围的高度
    function getClientHeight() {
        var clientHeight = 0;
        if (document.body.clientHeight && document.documentElement.clientHeight) {
            clientHeight = Math.min(document.body.clientHeight, document.documentElement.clientHeight);
        }
        else {
            clientHeight = Math.max(document.body.clientHeight, document.documentElement.clientHeight);
        }
        return clientHeight;
    }
    //获取文档完整的高度
    function getScrollHeight() {
        return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
    }

</script>
<script>
    $(function(){
        window.onscroll = function () {
            if (getScrollTop() + getClientHeight() == getScrollHeight()) {
                var column = "<?php echo I('column');?>";
                var limit = $('.limit').html();
                $('.loading').show();
                $.post('<?php echo U("News/index");?>', {column:column,limit: limit }, function (data) {
                    $('.before').before(data);
                    $('.loading').hide();
                    $('.limit').html(parseInt(limit)+parseInt(20))
                });
            }
        }
    })
</script>
</body>
</html>